<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
class CreateArrivedTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('arrived', function (Blueprint $table) {
            $table->id();
            $table->integer("exhibition_id")->comment("展会id");
            $table->bigInteger("user_id")->comment("用户id")->index();
            $table->boolean("is_invite")->default(false)->index()->comment("是否受邀")->nullable();
            $table->integer("arrive_time")->comment("到馆时间")->nullable();
            $table->integer("input_time")->comment("录入时间")->nullable();
            $table->boolean("is_plans")->comment("是否计划参会")->default(false)->nullable();
            $table->integer("seller")->comment("销售id")->nullable();

        });
        DB::statement("ALTER TABLE `arrived` comment'会议邀请表'");//表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('arrived');
    }
}
